

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Create Feed</title>
    </head>
    <body>
        <div class="body">
            <h1>Create Feed</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${feedInfoInstance}">
            <div class="errors">
                <g:renderErrors bean="${feedInfoInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" method="post" >
                <input type="hidden" id="user.id" name="user.id" value="<g:loggedInUserInfo field='id'/>"/>
                <div class="dialog">
                    <table>
                        <tbody> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="feedName">Feed Name:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:feedInfoInstance,field:'feedName','errors')}">
                                    <input type="text" id="feedName" name="feedName" value="${fieldValue(bean:feedInfoInstance,field:'feedName')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="feedUrl">Feed Url:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:feedInfoInstance,field:'feedUrl','errors')}">
                                    <input type="text" id="feedUrl" name="feedUrl" value="${fieldValue(bean:feedInfoInstance,field:'feedUrl')}"/>
                                </td>
                            </tr>

                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="includeFilter">Filter Keywords:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:feedInfoInstance,field:'includeFilter','errors')}">
                                    <input type="text" id="includeFilter" name="includeFilter" value="${fieldValue(bean:feedInfoInstance,field:'includeFilter')}"/> <small>Feed Entries are synced only if they contain at least one of these expressions.</small>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="updateFrequency">Update every:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:feedInfoInstance,field:'updateFrequency','errors')}">
                                    <g:select id="updateFrequency" name="updateFrequency" from="${FeedInfo.constraints.updateFrequency.inList}" value="${fieldValue(bean:feedInfoInstance,field:'updateFrequency')}" ></g:select> minutes
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><input class="save" type="submit" value="Create" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
